# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-optparse-pretty
_pkgname=optparse-pretty
pkgver=0.1.1
pkgrel=9
pkgdesc='A more compact help formatter for optparse.'
arch=('any')
url='https://pypi.org/project/optparse-pretty/#files'
license=('BSD')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/optparse-pretty-$pkgver.tar.gz")
sha512sums=('2342109e9e258842803d2e6d3e8ad0a4082bd9bec9260ce4049328c0f0326cd79dc256e19765a91bf6d62cefcb3891b43682ef7fcbe928b4457bb6d7f5436cbe')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

